import Vue from 'vue'
import VueRouter from 'vue-router'

import Err from '../views/err.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/login',
    name: 'login',
    component: () => import( '../views/login/login.vue')
  },
  {
    path: '/register',
    name: 'register',
    component: () => import( '../views/login/register.vue')
  },
 
  {
    path: '/shouye',
    name: 'shouye',
    component: () => import( '../views/home/shouye.vue')
  },
  
  {
    path: '/xingcheng',
    name: 'xingcheng',
    component: () => import( '../views/xingcheng/xingcheng.vue')
  },
  {
    path: '/circle',
    name: 'circle',
    component: () => import( '../views/circle/circle.vue')
  },
  {
    path: '/dongtai',
    name: 'dongtai',
    
    component: () => import( '../views/dongtai/dongtai.vue')
  },
  {
    path: '/user',
    name: 'user',
    component: () => import( '../views/user/user.vue')
  },
  {
    path: '/moreService',
    name: 'moreService',
    component: () => import( '../views/home/moreServices.vue')
  },
  {
    path: '/jizhi',
    name: 'jizhi',
    component: () => import( '../views/home/jizhi.vue')
  },
  {
    path: '/set',
    name: 'set',
    component: () => import( '../views/user/set.vue')
  },
  {
    path: '/accountInfo',
    name: 'accountInfo',
    component: () => import( '../views/user/accountInfo.vue')
  },
  {
    path: '/personalInfo',
    name: 'personalInfo',
    component: () => import( '../views/user/personalInfo.vue')
  },
  {
    path: '/survey',
    name: 'survey',
    component: () => import( '../views/home/survey.vue')
  },
  {
    path: '/question',
    name: 'question',
    component: () => import( '../views/home/question.vue')
  },
  {
    path: '/tripStatistics',
    name: 'tripStatistics',
    component: () => import( '../views/home/tripStatistics.vue')
  },
  {
    path: '/indexBar',
    name: 'indexBar',
    component: () => import( '../views/home/indexBar.vue')
  },
  {
    path: '/redar',
    name: 'redar',
    component: () => import( '../views/home/redar.vue')
  },
  // ============add==============
  {
    path: '/props',
    name: 'props',
    component: () => import( '../views/add/props.vue')
  },
  {
    path: '/ni',
    name: 'ni',
    component: () => import( '../views/ni.vue')
  },
  // {
  //   path: '/xiongdi',
  //   name: 'xiongdi',
  //   component: () => import( '../views/xiongdi.vue')
  // },
// 重定向=======================================
  {
    path:"/",redirect:"/login"
},
  {
    path: '*',
    name: 'err',
   component:Err
  },


]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router